﻿using AbpDemo.Filters;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;

namespace AbpDemo;

[DependsOn(
    typeof(AbpDemoDomainModule),
    typeof(AbpDemoApplicationContractsModule)
    )]
public class AbpDemoApplicationModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<AbpAutoMapperOptions>(options =>
        {
            options.AddMaps<AbpDemoApplicationModule>();
        });

        context.Services.AddSwaggerGen(options => { 
            options.SchemaFilter<SchemaFilter>();
        });

        context.Services.AddHttpContextAccessor();
    }
}
